﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GameCore
{
    class Pawn:Figure //пешка
    {

        public override bool PossibleMoveTo(int col, int row, Board b)
        {
            if (Pos.ColIndex!= col) return false; //не по вертикали
            if (Pos.RowIndex == 2)
            {
                if (row == 3)
                {
                    if (b.EmptyAt(col,3)) return true;
                }
                if (row == 4)
                {
                    if (b.EmptyAt(col, 3) && b.EmptyAt(col, 4)) return true;
                }
            }
            if (b.EmptyAt(col, row + 1)) return true;
            return false;
        }
    }
}
